password last changed

Hello guys,

Is there a possibility to get the date of the last password change of a user using dxl?
I've only found the boolean property 'passwordChanged' that tells you if the user ever changed his password, but not the date..

Any suggestions?

Regards,
Manuel
ManuelFelger - Mon Nov 30 09:40:52 EST 2009

Re: password last changed
SystemAdmin - Tue Dec 01 01:11:18 EST 2009

There is a function passwordLastChanged (undocumented) in Tony Goodman's list of DXL functions at http://www.smartdxl.com/downloads/undoc31.html. Playing around with this I came up with:
 

User u = find()
Date LastChange = u.passwordLastChanged
print LastChange ""

Re: password last changed
ManuelFelger - Fri Dec 04 02:25:32 EST 2009

SystemAdmin - Tue Dec 01 01:11:18 EST 2009

There is a function passwordLastChanged (undocumented) in Tony Goodman's list of DXL functions at http://www.smartdxl.com/downloads/undoc31.html. Playing around with this I came up with:
 

User u = find()
Date LastChange = u.passwordLastChanged
print LastChange ""

Thank you Pekka!

Re: password last changed
kabr - Wed Dec 09 03:12:17 EST 2009

SystemAdmin - Tue Dec 01 01:11:18 EST 2009

There is a function passwordLastChanged (undocumented) in Tony Goodman's list of DXL functions at http://www.smartdxl.com/downloads/undoc31.html. Playing around with this I came up with:
 

User u = find()
Date LastChange = u.passwordLastChanged
print LastChange ""

Yes, but if the password has never been changed this will throw an error...

Re: password last changed
llandale - Thu Dec 10 16:05:23 EST 2009

kabr - Wed Dec 09 03:12:17 EST 2009
Yes, but if the password has never been changed this will throw an error...

I think that's what the 'usr.passwordChanged' property does: false when you create the user, sets and remains true forever when that user changes the password for the first time. Seems to me I tried to set it false and it wouldn't let me.

  • Louie

Re: password last changed
TVu - Tue May 26 15:46:15 EDT 2015

kabr - Wed Dec 09 03:12:17 EST 2009
Yes, but if the password has never been changed this will throw an error...

Does anyone know how to avoid error if the password has never been changed?  How should be checked?  Thx.

Re: password last changed
llandale - Wed May 27 20:12:23 EDT 2015

TVu - Tue May 26 15:46:15 EDT 2015

Does anyone know how to avoid error if the password has never been changed?  How should be checked?  Thx.

If I remember, these particular functions may NOT be used inside an "if" statement:

  • wrong:  if (usr.passwordChanged) then ..
  • righte:  bool HasChanged = use.passwordChanged
          if (HasChanged) then ...

-Louie

Re: password last changed
TVu - Tue Jun 02 14:09:07 EDT 2015

llandale - Wed May 27 20:12:23 EDT 2015

If I remember, these particular functions may NOT be used inside an "if" statement:

  • wrong:  if (usr.passwordChanged) then ..
  • righte:  bool HasChanged = use.passwordChanged
          if (HasChanged) then ...

-Louie

Thanks, Louie. Got it to work.